package com.treasure.mall.zbqmallapi.vo.integral;

import com.treasure.mall.biz.entity.marketing.UserSignInPO;
import com.treasure.mall.biz.vo.BaseVO;
import com.treasure.mall.zbq.common.Jsr310Utils;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author allan
 * @version 1.0.0
 * @date 2020/8/26
 */
@Data
@NoArgsConstructor
public class UserSignInLogVO implements BaseVO {
    private static final long serialVersionUID = 5973227897325065866L;

    private Long id;
    private Long userId;
    /**
     * 签到时间 yyyy-MM-dd
     */
    private String signDate;
    /**
     * 连续签到的次数（算上本条记录）
     */
    private int continueNum;
    /**
     * 获得的积分数量
     */
    private long integral;

    public UserSignInLogVO(UserSignInPO po) {
        this.id = po.getId();
        this.userId = po.getUserId();
        this.signDate = Jsr310Utils.Date.asString(po.getSignDate());
        this.continueNum = po.getContinueNum();
        this.integral = po.getIntegral();
    }
}
